package merchant

import (
	"crmeb-common/global"
	"math/big"
)

// MerchantBalanceRecord 商户余额记录表
type MerchantBalanceRecord struct {
	global.BaseModel
	MerId int32 `json:"merId" gorm:"column=mer_id;comment:商户id"`

	LinkNo string `json:"linkNo" gorm:"column=link_no;comment:关联单号（订单号、结算单号、退款单号）"`

	LinkType string `json:"linkType" gorm:"column=link_type;comment:关联类型（order-订单,closing-结算,refund-退款）"`

	Type int32 `json:"type" gorm:"column=type;comment:类型：1-增加，2-扣减"`

	Title string `json:"title" gorm:"column=title;comment:标题"`

	Amount big.Float `json:"amount" gorm:"column=amount;comment:金额"`

	Balance big.Float `json:"balance" gorm:"column=balance;comment:剩余"`

	Mark string `json:"mark" gorm:"column=mark;comment:备注"`

	Status int32 `json:"status" gorm:"column=status;comment:状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款/申请被拒），5-提现申请"`

	FrozenTime int32 `json:"frozenTime" gorm:"column=frozen_time;comment:冻结期时间（天）"`

	ThawTime int64 `json:"thawTime" gorm:"column=thaw_time;comment:解冻时间"`
}
